package com.tcdp.controllers.view;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

public abstract class AbstractViewController {
	
	protected void throwError(HttpServletResponse response,int errorStatusCode) throws IOException{
		
		String message = "Unresolved Error";
		
		if(errorStatusCode == HttpServletResponse.SC_NOT_FOUND){
			message = "Page not found";
		}
		
		response.sendError(errorStatusCode, message);
	}
	
}
